Skip to content

fix(sonar): resolve S2142, S3923, S2175, S5998, S3077, S6856, S1751, S5850, S5855, S5841#32

Merged
aksOps merged 3 commits into
mainfrom
fix/sonar-issues
Apr 4, 2026
Merged

fix(sonar): resolve S2142, S3923, S2175, S5998, S3077, S6856, S1751, S5850, S5855, S5841#32
aksOps merged 3 commits into
mainfrom
fix/sonar-issues

Conversation

@aksOps

@aksOps aksOps commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • S2142 — Restore interrupt flag on InterruptedException in RepositoryIdentity, Analyzer, FileDiscovery (×2), and BundleCommand
  • S3923 — Remove dead if-else with identical branches in CodeIqApplication graph path setup
  • S2175 — Fix Boolean key type mismatch in GitHubActionsDetector YAML parsing
  • S5998 — Bound [^)]* quantifiers to prevent ReDoS in NestJSControllerDetector; fix catastrophic backtracking in JdbcDetector and RawSqlDetector (×3 patterns)
  • S3077 — Replace volatile List<> with AtomicReference<List<>> in TopologyController for correct compound-action thread safety
  • S6856 — Bind @PathVariable String path in SpaController catch-all route
  • S1751 — Move break inside condition guard in JpaEntityDetector so it only fires on match
  • S5850 — Add grouping parentheses to alternation in CSharpStructuresDetector regex
  • S5855 — Replace redundant (?:Blocking|Future|) with (?:Blocking|Future)? in GrpcServiceDetector
  • S5841 — Add .isNotEmpty() guard before .allMatch() in CapabilityMatrixTest

Test Plan

  • Full test suite: 1680 tests, 0 failures, 0 errors
  • All SonarCloud rule violations directly addressed
  • No behaviour changes — all fixes are correctness/safety improvements only

🤖 Generated with Claude Code

aksOps and others added 3 commits April 4, 2026 06:41
… dead branch + S2175 Boolean key

- S2142: Split catch(Exception) blocks at 5 sites (RepositoryIdentity, Analyzer,
  FileDiscovery x2, BundleCommand) so InterruptedException is caught separately
  and Thread.currentThread().interrupt() is called before returning.
- S3923: Remove dead if-else in CodeIqApplication.java where both branches set
  the same system property; replaced with a single unconditional assignment.
- S2175: Replace data.get(Boolean.TRUE) in GitHubActionsDetector with a stream
  over entrySet() to avoid passing a Boolean key into a Map<String,Object>.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dundant alternative + S5841 test emptiness

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ad safety + S6856 bind path variable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Apr 4, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
23.3% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@aksOps aksOps merged commit 91c032e into main Apr 4, 2026
9 of 10 checks passed
@aksOps aksOps deleted the fix/sonar-issues branch April 26, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant